home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Virus / xvs / Developer / include / C / libraries / xvs.h
C/C++ Source or Header  |  2002-05-15  |  5KB  |  145 lines

  1. #ifndef LIBRARIES_XVS_H
  2. #define LIBRARIES_XVS_H
  3.  
  4. /*
  5. **    $VER: xvs.h 33.37 (01.11.2001)
  6. **
  7. **    Copyright © 1998-2001 by Georg Hörmann and Dirk Stöcker
  8. **    All Rights Reserved
  9. */
  10.  
  11. #ifndef EXEC_LIBRARIES_H
  12. #include <exec/libraries.h>
  13. #endif
  14.  
  15. #ifndef EXEC_LISTS_H
  16. #include <exec/lists.h>
  17. #endif
  18.  
  19. /************************************************************************
  20. * Library Base                                *
  21. ************************************************************************/
  22.  
  23. /* xvsBase structure has become completely private with version 33.37 !!
  24.    For compatibility reasons, the fields that were not marked PRIVATE in
  25.    the original structure are guaranteed to be there in all the future
  26.    versions too. But please don't use this stuff in new code any longer!
  27. */
  28. #define xvs_DosBase    40
  29. #define xvs_ExecBase    44
  30.  
  31. #define    XVS_VERSION    33    /* for OpenLibrary() */
  32. #define    XVS_NAME    "xvs.library"
  33.  
  34. /************************************************************************
  35. * Virus List                                *
  36. ************************************************************************/
  37.  
  38. struct xvsVirusList {
  39.   struct List    xvsvl_List;
  40.   UWORD        xvsvl_Count;    /* amount of entries */
  41. };
  42.  
  43. /* values for xvsVirusList->xvsl_List.lh_Type and xvsCreateVirusList() */
  44.  
  45. #define XVSLIST_BOOTVIRUSES    0x42
  46. #define XVSLIST_DATAVIRUSES    0x44    /* V33.34 */
  47. #define XVSLIST_FILEVIRUSES    0x46
  48. #define XVSLIST_LINKVIRUSES    0x4C
  49.  
  50. /************************************************************************
  51. * Object Types                                *
  52. ************************************************************************/
  53.  
  54. #define XVSOBJ_BOOTINFO        1    /* xvsBootInfo structure */
  55. #define XVSOBJ_SECTORINFO    2    /* xvsSectorInfo structure */
  56. #define XVSOBJ_FILEINFO        3    /* xvsFileInfo structure */
  57. #define XVSOBJ_MEMORYINFO    4    /* xvsMemoryInfo structure */
  58. #define XVSOBJ_MAX        4    /* PRIVATE */
  59.  
  60. /************************************************************************
  61. * Bootblock Info                            *
  62. ************************************************************************/
  63.  
  64. struct xvsBootInfo {
  65.   APTR        xvsbi_Bootblock;    /* buffer holding bootblock */
  66.   STRPTR    xvsbi_Name;        /* description of bootblock */
  67.   UBYTE        xvsbi_BootType;        /* type of bootblock */
  68.   UBYTE        xvsbi_DosType;        /* dos type (eg. DOS0 -> 0) */
  69.   UBYTE        xvsbi_ChkSumFlag;    /* TRUE if checksum correct */
  70.   UBYTE        xvsbi_Reserved0;    /* PRIVATE */
  71. };
  72.  
  73. /* values for xvsBootInfo->xvsbi_BootType and xvsInstallBootblock() */
  74.  
  75. #define XVSBT_UNKNOWN        0    /* Unknown bootblock */
  76. #define XVSBT_NOTDOS        1    /* Not a DOS bootblock */
  77. #define XVSBT_STANDARD13    2    /* Standard bootblock (1.3) */
  78. #define XVSBT_STANDARD20    3    /* Standard bootblock (2.0) */
  79. #define XVSBT_VIRUS        4    /* xvsbi_Name = virus name */
  80. #define XVSBT_UNINSTALLED    5    /* ONLY xvsInstallBootblock() */
  81.  
  82. /************************************************************************
  83. * Sector Info                                *
  84. ************************************************************************/
  85.  
  86. struct xvsSectorInfo {
  87.   APTR        xvssi_Sector;        /* buffer holding sector */
  88.   ULONG        xvssi_Key;        /* sector number */
  89.   STRPTR    xvssi_Name;        /* description of sector */
  90.   UBYTE     xvssi_SectorType;    /* type of sector */
  91.   UBYTE     xvssi_InternalType;    /* PRIVATE */
  92. };
  93.  
  94. /* values for xvsSectorInfo->xvssi_SectorType */
  95.  
  96. #define XVSST_UNKNOWN        0    /* Unknown sector */
  97. #define XVSST_DESTROYED        1    /* xvssi_Name = virus name */
  98. #define XVSST_INFECTED        2    /* xvssi_Name = virus name */
  99.  
  100. /************************************************************************
  101. * File Info                                *
  102. ************************************************************************/
  103.  
  104. struct xvsFileInfo {
  105.   APTR        xvsfi_File;        /* buffer holding whole file */
  106.   ULONG        xvsfi_FileLen;        /* length of file */
  107.   STRPTR    xvsfi_Name;        /* description of file */
  108.   UBYTE        xvsfi_FileType;        /* type of file */
  109.   UBYTE        xvsfi_ModifiedFlag;    /* TRUE if file was modified */
  110.   UBYTE        xvsfi_ErrorCode;    /* only for xvsRepairFile() */
  111.   UBYTE        xvsfi_InternalType;    /* PRIVATE */
  112.   APTR        xvsfi_Fixed;        /* start of fixed file */
  113.   ULONG        xvsfi_FixedLen;        /* length of fixed file */
  114. };
  115.  
  116. /* values for xvsFileInfo->xvsfi_FileType */
  117.  
  118. #define XVSFT_EMPTYFILE        1    /* Empty file */
  119. #define XVSFT_DATAFILE        2    /* Data file */
  120. #define XVSFT_EXEFILE        3    /* Executable file */
  121. #define XVSFT_DATAVIRUS        4    /* xvsfi_Name = virus name */
  122. #define XVSFT_FILEVIRUS        5    /* xvsfi_Name = virus name */
  123. #define XVSFT_LINKVIRUS        6    /* xvsfi_Name = virus name */
  124.  
  125. /* values for xvsFileInfo->xvsfi_ErrorCode */
  126.  
  127. #define XVSERR_WRONGFILETYPE    1    /* Wrong type of file */
  128. #define XVSERR_FILETRUNCATED    2    /* File truncated */
  129. #define XVSERR_UNSUPPORTEDHUNK    3    /* Unsupported hunk */
  130. #define XVSERR_UNEXPECTEDDATA    4    /* Unexpected data */
  131. #define XVSERR_OUTOFMEMORY    5    /* Out of memory */
  132. #define XVSERR_NOTIMPLEMENTED    6    /* (V33.15) Not implemented yet */
  133.  
  134. /************************************************************************
  135. * Memory Info                                *
  136. ************************************************************************/
  137.  
  138. struct xvsMemoryInfo {
  139.   UWORD        xvsmi_Count;        /* amount of detected viruses */
  140.   UWORD        xvsmi_Reserved0;    /* PRIVATE */
  141.   STRPTR    xvsmi_NameArray[5];    /* names of viruses */
  142. };
  143.  
  144. #endif /* LIBRARIES_XVS_H */
  145.